package org.microblog.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 许欣
 * 时间：2022/4/21 14:35
 * 描述：
 */
public class ApplicationContextUtil {
    private static ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");

    public  Object getBean(String BeanName){
        return context.getBean(BeanName);
    }
}
